const excepts = ["/api/user/login", "/api/user/zhuce"];
module.exports = function (req, res, next) {
    if (!req.signedCookies.userId && !excepts.includes(req.path)) {
        if (req.method.toLocaleLowerCase() == "get") {
            next();
            return;
        }
        res.send({
            code: 403,
            message: "你没有权限"
        })
    } else {
        next();
    }
}
